package com.jingdong.callback.model;

/**
 * SDK配置
 * 
 * @author SDK Team
 */
public class SDKConfig {
    
    /**
     * 开发者ID
     */
    private String developerId;
    
    /**
     * 签名密钥
     */
    private String secret;
    
    /**
     * 环境配置：test, sandbox, prod
     */
    private String environment = "test";
    
    /**
     * Redis主机地址
     */
    private String redisHost;
    
    /**
     * Redis端口
     */
    private int redisPort = 6379;
    
    /**
     * Redis数据库编号
     */
    private int redisDatabase = 0;
    
    /**
     * Redis密码
     */
    private String redisPassword;
    
    /**
     * Redis连接超时时间（毫秒）
     */
    private int redisTimeout = 3000;
    
    /**
     * 是否启用日志
     */
    private boolean enableLog = true;
    
    /**
     * 用户代理
     */
    private String userAgent = "JingdongCallbackSDK-Java/1.0.0";
    
    // Getters and Setters
    
    public String getDeveloperId() {
        return developerId;
    }
    
    public void setDeveloperId(String developerId) {
        this.developerId = developerId;
    }
    
    public String getSecret() {
        return secret;
    }
    
    public void setSecret(String secret) {
        this.secret = secret;
    }
    
    public String getEnvironment() {
        return environment;
    }
    
    public void setEnvironment(String environment) {
        this.environment = environment;
    }
    
    public String getRedisHost() {
        return redisHost;
    }
    
    public void setRedisHost(String redisHost) {
        this.redisHost = redisHost;
    }
    
    public int getRedisPort() {
        return redisPort;
    }
    
    public void setRedisPort(int redisPort) {
        this.redisPort = redisPort;
    }
    
    public int getRedisDatabase() {
        return redisDatabase;
    }
    
    public void setRedisDatabase(int redisDatabase) {
        this.redisDatabase = redisDatabase;
    }
    
    public String getRedisPassword() {
        return redisPassword;
    }
    
    public void setRedisPassword(String redisPassword) {
        this.redisPassword = redisPassword;
    }
    
    public int getRedisTimeout() {
        return redisTimeout;
    }
    
    public void setRedisTimeout(int redisTimeout) {
        this.redisTimeout = redisTimeout;
    }
    
    public boolean isEnableLog() {
        return enableLog;
    }
    
    public void setEnableLog(boolean enableLog) {
        this.enableLog = enableLog;
    }
    
    public String getUserAgent() {
        return userAgent;
    }
    
    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }
    
    @Override
    public String toString() {
        return "SDKConfig{" +
                "developerId='" + developerId + '\'' +
                ", secret='***'" +
                ", environment='" + environment + '\'' +
                ", redisHost='" + redisHost + '\'' +
                ", redisPort=" + redisPort +
                ", redisDatabase=" + redisDatabase +
                ", redisTimeout=" + redisTimeout +
                ", enableLog=" + enableLog +
                ", userAgent='" + userAgent + '\'' +
                '}';
    }
}
